package com.easylive.entity.enums;

/**
 * @Author 71740
 * @Description TODO
 * @Date 2025/4/19 8:01
 * @Version 1.0
 */
public enum UserSexEnum {
    WOMAN(0, "女"),
    MAN(1, "男"),
    SECRECY(2, "保密");

    private Integer type;
    private String desc;

    UserSexEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static UserSexEnum getByType(Integer type) {
        for (UserSexEnum item : UserSexEnum.values()) {
            if (item.getType().equals(type)) {
                return item;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }
}
